package org.redis.cluster.interceptor;

import org.redis.cluster.redis.RedisCommand;
import org.redis.cluster.redis.transport.RedisReply;
import org.redis.cluster.transport.session.Session;

public interface Invocation {
	
	/**
	 * 返回会话
	 * @return
	 */
	public Session getSession();
	
	/**
	 * 返回命令
	 * @return
	 */
	public RedisCommand getCommand();

	/**
	 * 调用
	 * @return
	 * @throws Throwable
	 */
	public RedisReply invoke() throws Throwable;
}